<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>Xadmin | 美多商城</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="gitbook/style.css">
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="./C08-Permission.html" />
    
    
    <link rel="prev" href="./C06-Pay/PaymentResult.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="7"
        data-chapter-title="Xadmin"
        data-filepath="C07-Xadmin.md"
        data-basepath="."
        data-revision="Sat Aug 11 2018 20:09:13 GMT+0800 (CST)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="./index.html">
                
                        <i class="fa fa-check"></i>
                        
                        美多商城
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="C01-Prepare/index.html">
            
                
                    <a href="./C01-Prepare/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        项目准备
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="C01-Prepare/BusinessModel.html">
            
                
                    <a href="./C01-Prepare/BusinessModel.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        商业模式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="C01-Prepare/DevelopmentProcess.html">
            
                
                    <a href="./C01-Prepare/DevelopmentProcess.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        开发流程
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="C01-Prepare/ProductAnalysis.html">
            
                
                    <a href="./C01-Prepare/ProductAnalysis.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        需求分析
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="C01-Prepare/ProjectStructure.html">
            
                
                    <a href="./C01-Prepare/ProjectStructure.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        项目架构
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="C01-Prepare/StartProject.html">
            
                
                    <a href="./C01-Prepare/StartProject.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        创建工程
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="C01-Prepare/Config.html">
            
                
                    <a href="./C01-Prepare/Config.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        配置
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="C02-Users/index.html">
            
                
                    <a href="./C02-Users/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        用户部分
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="C02-Users/UserModel.html">
            
                
                    <a href="./C02-Users/UserModel.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        用户模型类
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="C02-Users/RegisterAnalysis.html">
            
                
                    <a href="./C02-Users/RegisterAnalysis.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        注册业务接口分析
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="C02-Users/ImageCode.html">
            
                
                    <a href="./C02-Users/ImageCode.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        图片验证码
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="C02-Users/SMSCode.html">
            
                
                    <a href="./C02-Users/SMSCode.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        短信验证码
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="C02-Users/CORS.html">
            
                
                    <a href="./C02-Users/CORS.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        跨域CORS
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="C02-Users/CelerySendSMSCode.html">
            
                
                    <a href="./C02-Users/CelerySendSMSCode.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        使用Celery发送短信
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="C02-Users/AccountExistingCheck.html">
            
                
                    <a href="./C02-Users/AccountExistingCheck.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.</b>
                        
                        判断帐号是否存在
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.8" data-path="C02-Users/Register.html">
            
                
                    <a href="./C02-Users/Register.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.</b>
                        
                        注册
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.9" data-path="C02-Users/JWT.html">
            
                
                    <a href="./C02-Users/JWT.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.9.</b>
                        
                        JWT
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.10" data-path="C02-Users/DRF-JWT.html">
            
                
                    <a href="./C02-Users/DRF-JWT.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.</b>
                        
                        Django REST framework JWT
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.11" data-path="C02-Users/Login.html">
            
                
                    <a href="./C02-Users/Login.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.11.</b>
                        
                        登录
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.12" data-path="C02-Users/QQLogin/index.html">
            
                
                    <a href="./C02-Users/QQLogin/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.12.</b>
                        
                        QQ登录
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.12.1" data-path="C02-Users/QQLogin/Step1.html">
            
                
                    <a href="./C02-Users/QQLogin/Step1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.12.1.</b>
                        
                        第一步
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.12.2" data-path="C02-Users/QQLogin/Step2.html">
            
                
                    <a href="./C02-Users/QQLogin/Step2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.12.2.</b>
                        
                        第二步
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.12.3" data-path="C02-Users/QQLogin/Step3.html">
            
                
                    <a href="./C02-Users/QQLogin/Step3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.12.3.</b>
                        
                        第三步
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.13" data-path="C02-Users/UserInfo.html">
            
                
                    <a href="./C02-Users/UserInfo.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.13.</b>
                        
                        用户中心个人信息
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.14" data-path="C02-Users/Email/index.html">
            
                
                    <a href="./C02-Users/Email/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.14.</b>
                        
                        邮件与验证
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.14.1" data-path="C02-Users/Email/DjangoEmail.html">
            
                
                    <a href="./C02-Users/Email/DjangoEmail.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.14.1.</b>
                        
                        Django发送邮件的方法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.14.2" data-path="C02-Users/Email/SendEmail.html">
            
                
                    <a href="./C02-Users/Email/SendEmail.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.14.2.</b>
                        
                        保存邮箱并发送验证邮件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.14.3" data-path="C02-Users/Email/VerifyEmail.html">
            
                
                    <a href="./C02-Users/Email/VerifyEmail.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.14.3.</b>
                        
                        验证邮箱链接
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.15" data-path="C02-Users/Address/index.html">
            
                
                    <a href="./C02-Users/Address/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.15.</b>
                        
                        收货地址
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.15.1" data-path="C02-Users/Address/AreaSelect.html">
            
                
                    <a href="./C02-Users/Address/AreaSelect.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.15.1.</b>
                        
                        省市区地址查询
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.15.2" data-path="C02-Users/Address/Cache.html">
            
                
                    <a href="./C02-Users/Address/Cache.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.15.2.</b>
                        
                        使用缓存
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.15.3" data-path="C02-Users/Address/UserAddressManagement.html">
            
                
                    <a href="./C02-Users/Address/UserAddressManagement.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.15.3.</b>
                        
                        用户地址管理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.15.4" data-path="C02-Users/Address/UserAddressCode.html">
            
                
                    <a href="./C02-Users/Address/UserAddressCode.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.15.4.</b>
                        
                        用户地址代码
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="C03-Goods/index.html">
            
                
                    <a href="./C03-Goods/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        商品部分
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="C03-Goods/DatabaseDesign.html">
            
                
                    <a href="./C03-Goods/DatabaseDesign.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        数据表设计
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="C03-Goods/FastDFS.html">
            
                
                    <a href="./C03-Goods/FastDFS.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        FastDFS分布式文件系统
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="C03-Goods/Docker/index.html">
            
                
                    <a href="./C03-Goods/Docker/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        Docker使用
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.3.1" data-path="C03-Goods/Docker/Introduce.html">
            
                
                    <a href="./C03-Goods/Docker/Introduce.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.1.</b>
                        
                        Docker简介
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3.2" data-path="C03-Goods/Docker/InstallAndOperations.html">
            
                
                    <a href="./C03-Goods/Docker/InstallAndOperations.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.2.</b>
                        
                        安装与操作
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="C03-Goods/FastDFSDocker.html">
            
                
                    <a href="./C03-Goods/FastDFSDocker.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        使用Docker安装FastDFS
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="C03-Goods/FastDFSClientAndDjangoFileSystem.html">
            
                
                    <a href="./C03-Goods/FastDFSClientAndDjangoFileSystem.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.5.</b>
                        
                        FastDFS客户端与自定义文件存储系统
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="C03-Goods/CKEditor.html">
            
                
                    <a href="./C03-Goods/CKEditor.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.6.</b>
                        
                        CKEditor富文本编辑器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="C03-Goods/ImportGoodsData.html">
            
                
                    <a href="./C03-Goods/ImportGoodsData.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.7.</b>
                        
                        添加测试数据
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.8" data-path="C03-Goods/FreezeHTML.html">
            
                
                    <a href="./C03-Goods/FreezeHTML.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.8.</b>
                        
                        页面静态化
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.9" data-path="C03-Goods/DjangoCrontab.html">
            
                
                    <a href="./C03-Goods/DjangoCrontab.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.9.</b>
                        
                        定时任务
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.10" data-path="C03-Goods/GenerateIndexHTMLScript.html">
            
                
                    <a href="./C03-Goods/GenerateIndexHTMLScript.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.10.</b>
                        
                        静态化首页的手动脚本
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.11" data-path="C03-Goods/GoodsDetail.html">
            
                
                    <a href="./C03-Goods/GoodsDetail.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.11.</b>
                        
                        商品详情页面
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.12" data-path="C03-Goods/UserBrowseHistory.html">
            
                
                    <a href="./C03-Goods/UserBrowseHistory.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.12.</b>
                        
                        用户浏览历史记录
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.13" data-path="C03-Goods/GoodsList.html">
            
                
                    <a href="./C03-Goods/GoodsList.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.13.</b>
                        
                        商品列表页
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.14" data-path="C03-Goods/GoodsSearch.html">
            
                
                    <a href="./C03-Goods/GoodsSearch.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.14.</b>
                        
                        商品搜索
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="C04-Cart/index.html">
            
                
                    <a href="./C04-Cart/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        购物车部分
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="C04-Cart/DataStructureDesign.html">
            
                
                    <a href="./C04-Cart/DataStructureDesign.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        购物车数据存储设计
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="C04-Cart/Add.html">
            
                
                    <a href="./C04-Cart/Add.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        购物车增加
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="C04-Cart/Query.html">
            
                
                    <a href="./C04-Cart/Query.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        购物车查询
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="C04-Cart/Modify.html">
            
                
                    <a href="./C04-Cart/Modify.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.</b>
                        
                        购物车修改
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="C04-Cart/Delete.html">
            
                
                    <a href="./C04-Cart/Delete.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.5.</b>
                        
                        购物车删除
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.6" data-path="C04-Cart/SelectAll.html">
            
                
                    <a href="./C04-Cart/SelectAll.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.6.</b>
                        
                        购物车全选
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.7" data-path="C04-Cart/MergeCart.html">
            
                
                    <a href="./C04-Cart/MergeCart.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.7.</b>
                        
                        登录合并购物车
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="C05-Order/index.html">
            
                
                    <a href="./C05-Order/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        订单部分
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="C05-Order/OrderDBModel.html">
            
                
                    <a href="./C05-Order/OrderDBModel.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        订单数据库设计
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="C05-Order/PlaceOrder.html">
            
                
                    <a href="./C05-Order/PlaceOrder.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        订单结算
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="C05-Order/SaveOrder.html">
            
                
                    <a href="./C05-Order/SaveOrder.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.</b>
                        
                        保存订单
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.4" data-path="C05-Order/OrderSuccess.html">
            
                
                    <a href="./C05-Order/OrderSuccess.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.4.</b>
                        
                        下单成功
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6" data-path="C06-Pay/index.html">
            
                
                    <a href="./C06-Pay/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        支付宝支付
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1" data-path="C06-Pay/Alipay.html">
            
                
                    <a href="./C06-Pay/Alipay.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.</b>
                        
                        接入支付宝
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="C06-Pay/Paying.html">
            
                
                    <a href="./C06-Pay/Paying.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.</b>
                        
                        发起支付
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.3" data-path="C06-Pay/PaymentResult.html">
            
                
                    <a href="./C06-Pay/PaymentResult.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.3.</b>
                        
                        保存支付结果
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter active" data-level="7" data-path="C07-Xadmin.html">
            
                
                    <a href="./C07-Xadmin.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.</b>
                        
                        Xadmin
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8" data-path="C08-Permission.html">
            
                
                    <a href="./C08-Permission.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.</b>
                        
                        用户权限控制
                    </a>
            
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="./" >美多商城</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="xadmin">Xadmin</h1>
<p><img src="images/xadmin.png" alt="xadmin"></p>
<p>xadmin&#x662F;Django&#x7684;&#x7B2C;&#x4E09;&#x65B9;&#x6269;&#x5C55;&#xFF0C;&#x53EF;&#x662F;&#x4F7F;Django&#x7684;admin&#x7AD9;&#x70B9;&#x4F7F;&#x7528;&#x66F4;&#x65B9;&#x4FBF;&#x3002;</p>
<h2 id="1--&#x5B89;&#x88C5;">1.  &#x5B89;&#x88C5;</h2>
<p>&#x901A;&#x8FC7;&#x5982;&#x4E0B;&#x547D;&#x4EE4;&#x5B89;&#x88C5;xadmin&#x7684;&#x6700;&#x65B0;&#x7248;</p>
<pre><code class="lang-shell">pip install https://github.com/sshwsfc/xadmin/tarball/master
</code></pre>
<p>&#x5728;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x4E2D;&#x6CE8;&#x518C;&#x5982;&#x4E0B;&#x5E94;&#x7528;</p>
<pre><code class="lang-python">INSTALLED_APPS = [
    ...
    <span class="hljs-string">&apos;xadmin&apos;</span>,
    <span class="hljs-string">&apos;crispy_forms&apos;</span>,
    <span class="hljs-string">&apos;reversion&apos;</span>,
    ...
]
</code></pre>
<p>xadmin&#x6709;&#x5EFA;&#x7ACB;&#x81EA;&#x5DF1;&#x7684;&#x6570;&#x636E;&#x5E93;&#x6A21;&#x578B;&#x7C7B;&#xFF0C;&#x9700;&#x8981;&#x8FDB;&#x884C;&#x6570;&#x636E;&#x5E93;&#x8FC1;&#x79FB;</p>
<pre><code class="lang-shell">python manage.py makemigrations
python manage.py migrate
</code></pre>
<p>&#x5728;&#x603B;&#x8DEF;&#x7531;&#x4E2D;&#x6DFB;&#x52A0;xadmin&#x7684;&#x8DEF;&#x7531;&#x4FE1;&#x606F;</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> xadmin

urlpatterns = [
    <span class="hljs-comment"># url(r&apos;^admin/&apos;, admin.site.urls),</span>
    url(<span class="hljs-string">r&apos;xadmin/&apos;</span>, include(xadmin.site.urls)),
    ...
]
</code></pre>
<h2 id="2--&#x4F7F;&#x7528;">2.  &#x4F7F;&#x7528;</h2>
<ul>
<li>xadmin&#x4E0D;&#x518D;&#x4F7F;&#x7528;Django&#x7684;admin.py&#xFF0C;&#x800C;&#x662F;&#x9700;&#x8981;&#x7F16;&#x5199;&#x4EE3;&#x7801;&#x5728;adminx.py&#x6587;&#x4EF6;&#x4E2D;&#x3002;</li>
<li>xadmin&#x7684;&#x7AD9;&#x70B9;&#x7BA1;&#x7406;&#x7C7B;&#x4E0D;&#x7528;&#x7EE7;&#x627F;<code>admin.ModelAdmin</code>&#xFF0C;&#x800C;&#x662F;&#x76F4;&#x63A5;&#x7EE7;&#x627F;<code>object</code>&#x5373;&#x53EF;&#x3002;</li>
</ul>
<p>&#x5728;goods&#x5E94;&#x7528;&#x4E2D;&#x521B;&#x5EFA;adminx.py&#x6587;&#x4EF6;&#x3002;</p>
<h4 id="&#x7AD9;&#x70B9;&#x7684;&#x5168;&#x5C40;&#x914D;&#x7F6E;">&#x7AD9;&#x70B9;&#x7684;&#x5168;&#x5C40;&#x914D;&#x7F6E;</h4>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> xadmin
<span class="hljs-keyword">from</span> xadmin <span class="hljs-keyword">import</span> views

<span class="hljs-keyword">from</span> . <span class="hljs-keyword">import</span> models

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">BaseSetting</span><span class="hljs-params">(object)</span>:</span>
    <span class="hljs-string">&quot;&quot;&quot;xadmin&#x7684;&#x57FA;&#x672C;&#x914D;&#x7F6E;&quot;&quot;&quot;</span>
    enable_themes = <span class="hljs-keyword">True</span>  <span class="hljs-comment"># &#x5F00;&#x542F;&#x4E3B;&#x9898;&#x5207;&#x6362;&#x529F;&#x80FD;</span>
    use_bootswatch = <span class="hljs-keyword">True</span>

xadmin.site.register(views.BaseAdminView, BaseSetting)

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">GlobalSettings</span><span class="hljs-params">(object)</span>:</span>
    <span class="hljs-string">&quot;&quot;&quot;xadmin&#x7684;&#x5168;&#x5C40;&#x914D;&#x7F6E;&quot;&quot;&quot;</span>
    site_title = <span class="hljs-string">&quot;&#x7F8E;&#x591A;&#x5546;&#x57CE;&#x8FD0;&#x8425;&#x7BA1;&#x7406;&#x7CFB;&#x7EDF;&quot;</span>  <span class="hljs-comment"># &#x8BBE;&#x7F6E;&#x7AD9;&#x70B9;&#x6807;&#x9898;</span>
    site_footer = <span class="hljs-string">&quot;&#x7F8E;&#x591A;&#x5546;&#x57CE;&#x96C6;&#x56E2;&#x6709;&#x9650;&#x516C;&#x53F8;&quot;</span>  <span class="hljs-comment"># &#x8BBE;&#x7F6E;&#x7AD9;&#x70B9;&#x7684;&#x9875;&#x811A;</span>
    menu_style = <span class="hljs-string">&quot;accordion&quot;</span>  <span class="hljs-comment"># &#x8BBE;&#x7F6E;&#x83DC;&#x5355;&#x6298;&#x53E0;</span>

xadmin.site.register(views.CommAdminView, GlobalSettings)
</code></pre>
<p><img src="images/xadmin&#x5168;&#x5C40;&#x914D;&#x7F6E;.png" alt="xadmin&#x5168;&#x5C40;&#x914D;&#x7F6E;"></p>
<h4 id="&#x7AD9;&#x70B9;model&#x7BA1;&#x7406;">&#x7AD9;&#x70B9;Model&#x7BA1;&#x7406;</h4>
<p>xadmin&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x7684;&#x9875;&#x9762;&#x6837;&#x5F0F;&#x63A7;&#x5236;&#x57FA;&#x672C;&#x4E0E;Django&#x539F;&#x751F;&#x7684;admin&#x4E00;&#x76F4;&#x3002;</p>
<ul>
<li><strong>list_display</strong>   &#x63A7;&#x5236;&#x5217;&#x8868;&#x5C55;&#x793A;&#x7684;&#x5B57;&#x6BB5;</li>
<li><strong>search_fields</strong>  &#x63A7;&#x5236;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x641C;&#x7D22;&#x6846;&#x641C;&#x7D22;&#x7684;&#x5B57;&#x6BB5;&#x540D;&#x79F0;&#xFF0C;xadmin&#x4F7F;&#x7528;&#x7684;&#x662F;&#x6A21;&#x7CCA;&#x67E5;&#x8BE2;</li>
<li><strong>list_filter</strong>  &#x53EF;&#x4EE5;&#x8FDB;&#x884C;&#x8FC7;&#x6EE4;&#x64CD;&#x4F5C;&#x7684;&#x5217;</li>
<li><strong>ordering</strong>  &#x9ED8;&#x8BA4;&#x6392;&#x5E8F;&#x7684;&#x5B57;&#x6BB5;</li>
<li><strong>readonly_fields</strong>  &#x5728;&#x7F16;&#x8F91;&#x9875;&#x9762;&#x7684;&#x53EA;&#x8BFB;&#x5B57;&#x6BB5;</li>
<li><strong>exclude</strong>  &#x5728;&#x7F16;&#x8F91;&#x9875;&#x9762;&#x9690;&#x85CF;&#x7684;&#x5B57;&#x6BB5;</li>
<li><strong>list_editable</strong>  &#x5728;&#x5217;&#x8868;&#x9875;&#x53EF;&#x4EE5;&#x5FEB;&#x901F;&#x76F4;&#x63A5;&#x7F16;&#x8F91;&#x7684;&#x5B57;&#x6BB5;</li>
<li><strong>show_detail_fileds</strong>  &#x5728;&#x5217;&#x8868;&#x9875;&#x63D0;&#x4F9B;&#x5FEB;&#x901F;&#x663E;&#x793A;&#x8BE6;&#x60C5;&#x4FE1;&#x606F;</li>
<li><strong>refresh_times</strong>  &#x6307;&#x5B9A;&#x5217;&#x8868;&#x9875;&#x7684;&#x5B9A;&#x65F6;&#x5237;&#x65B0;</li>
<li><strong>list_export</strong>  &#x63A7;&#x5236;&#x5217;&#x8868;&#x9875;&#x5BFC;&#x51FA;&#x6570;&#x636E;&#x7684;&#x53EF;&#x9009;&#x683C;&#x5F0F;</li>
<li><strong>show_bookmarks</strong>  &#x63A7;&#x5236;&#x662F;&#x5426;&#x663E;&#x793A;&#x4E66;&#x7B7E;&#x529F;&#x80FD;</li>
<li><strong>data_charts</strong>  &#x63A7;&#x5236;&#x663E;&#x793A;&#x56FE;&#x6807;&#x7684;&#x6837;&#x5F0F;</li>
<li><strong>model_icon</strong>  &#x63A7;&#x5236;&#x83DC;&#x5355;&#x7684;&#x56FE;&#x6807;</li>
</ul>
<p>1&#xFF09;model_icon</p>
<pre><code class="lang-python"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">SKUAdmin</span><span class="hljs-params">(object)</span>:</span>
    model_icon = <span class="hljs-string">&apos;fa fa-gift&apos;</span>

xadmin.site.register(models.SKU, SKUAdmin)
</code></pre>
<p><img src="images/model_icon.png" alt="model_icon"></p>
<p>&#x53EF;&#x9009;&#x7684;&#x56FE;&#x6807;&#x6837;&#x5F0F;&#x53C2;&#x8003;<a href="http://fontawesome.dashgame.com" target="_blank">http://fontawesome.dashgame.com</a>/</p>
<p>2&#xFF09; list_display</p>
<pre><code class="lang-python">    list_display = [<span class="hljs-string">&apos;id&apos;</span>, <span class="hljs-string">&apos;name&apos;</span>, <span class="hljs-string">&apos;price&apos;</span>, <span class="hljs-string">&apos;stock&apos;</span>, <span class="hljs-string">&apos;sales&apos;</span>, <span class="hljs-string">&apos;comments&apos;</span>]
</code></pre>
<p><img src="images/list_display.png" alt="list_display"></p>
<p>3&#xFF09;search_fields</p>
<pre><code class="lang-python">    search_fields = [<span class="hljs-string">&apos;id&apos;</span>,<span class="hljs-string">&apos;name&apos;</span>]
</code></pre>
<p><img src="images/search_fields.png" alt="search_fields"></p>
<p>4&#xFF09;list_filter</p>
<pre><code class="lang-python">    list_filter = [<span class="hljs-string">&apos;category&apos;</span>]
</code></pre>
<p><img src="images/list_filter.png" alt="list_filter"></p>
<p>5&#xFF09;list_editable</p>
<pre><code class="lang-python">    list_editable = [<span class="hljs-string">&apos;price&apos;</span>, <span class="hljs-string">&apos;stock&apos;</span>]
</code></pre>
<p><img src="images/list_editable.png" alt="list_editable"></p>
<p><img src="images/list_editable2.png" alt="list_editable"></p>
<p>6&#xFF09;show_detail_fields </p>
<pre><code class="lang-python">    show_detail_fields = [<span class="hljs-string">&apos;name&apos;</span>]
</code></pre>
<p><img src="images/show_detail_fields.png" alt="show_detail_fields"></p>
<p><img src="images/show_detail_fields2.png" alt="show_detail_fields2"></p>
<p>7&#xFF09;show_bookmarks</p>
<pre><code class="lang-python">    show_bookmarks = <span class="hljs-keyword">True</span>
</code></pre>
<p><img src="images/bookmarks.png" alt="bookmarks"></p>
<p>8&#xFF09;list_export</p>
<pre><code class="lang-python">    list_export = [<span class="hljs-string">&apos;xls&apos;</span>, <span class="hljs-string">&apos;csv&apos;</span>, <span class="hljs-string">&apos;xml&apos;</span>]
</code></pre>
<p><img src="images/list_export.png" alt="list_export"></p>
<p>&#x6CE8;&#x610F;&#xFF0C;&#x5BFC;&#x51FA;&#x5230;xls&#xFF08;excel) &#x9700;&#x8981;&#x5B89;&#x88C5;<strong>xlwt</strong>&#x6269;&#x5C55;</p>
<p>9&#xFF09;refresh_times</p>
<pre><code class="lang-python"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">OrderAdmin</span><span class="hljs-params">(object)</span>:</span>
    list_display = [<span class="hljs-string">&apos;order_id&apos;</span>, <span class="hljs-string">&apos;create_time&apos;</span>, <span class="hljs-string">&apos;total_amount&apos;</span>, <span class="hljs-string">&apos;pay_method&apos;</span>, <span class="hljs-string">&apos;status&apos;</span>]
    refresh_times = [<span class="hljs-number">3</span>, <span class="hljs-number">5</span>]  <span class="hljs-comment"># &#x53EF;&#x9009;&#x4EE5;&#x652F;&#x6301;&#x6309;&#x591A;&#x957F;&#x65F6;&#x95F4;(&#x79D2;)&#x5237;&#x65B0;&#x9875;&#x9762;</span>
</code></pre>
<p><img src="images/refresh_times.png" alt="refresh_times"></p>
<p>10&#xFF09;data_charts</p>
<pre><code class="lang-python">     data_charts = {
        <span class="hljs-string">&quot;order_amount&quot;</span>: {<span class="hljs-string">&apos;title&apos;</span>: <span class="hljs-string">&apos;&#x8BA2;&#x5355;&#x91D1;&#x989D;&apos;</span>, <span class="hljs-string">&quot;x-field&quot;</span>: <span class="hljs-string">&quot;create_time&quot;</span>, <span class="hljs-string">&quot;y-field&quot;</span>: (<span class="hljs-string">&apos;total_amount&apos;</span>,),
                       <span class="hljs-string">&quot;order&quot;</span>: (<span class="hljs-string">&apos;create_time&apos;</span>,)},
        <span class="hljs-string">&quot;order_count&quot;</span>: {<span class="hljs-string">&apos;title&apos;</span>: <span class="hljs-string">&apos;&#x8BA2;&#x5355;&#x91CF;&apos;</span>, <span class="hljs-string">&quot;x-field&quot;</span>: <span class="hljs-string">&quot;create_time&quot;</span>, <span class="hljs-string">&quot;y-field&quot;</span>: (<span class="hljs-string">&apos;total_count&apos;</span>,),
                       <span class="hljs-string">&quot;order&quot;</span>: (<span class="hljs-string">&apos;create_time&apos;</span>,)},
    }
</code></pre>
<ul>
<li>title  &#x63A7;&#x5236;&#x56FE;&#x6807;&#x540D;&#x79F0;</li>
<li>x-field &#x63A7;&#x5236;x&#x8F74;&#x5B57;&#x6BB5;</li>
<li>y-field &#x63A7;&#x5236;y&#x8F74;&#x5B57;&#x6BB5;&#xFF0C;&#x53EF;&#x4EE5;&#x662F;&#x591A;&#x4E2A;&#x503C;</li>
<li>order  &#x63A7;&#x5236;&#x9ED8;&#x8BA4;&#x6392;&#x5E8F;</li>
</ul>
<p><img src="images/data_charts.png" alt="data_charts"></p>
<p>11&#xFF09;readonly_fields</p>
<pre><code class="lang-python"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">SKUAdmin</span><span class="hljs-params">(object)</span>:</span>
    ...
    readonly_fields = [<span class="hljs-string">&apos;sales&apos;</span>, <span class="hljs-string">&apos;comments&apos;</span>]
</code></pre>
<p><img src="images/readonly_fields.png" alt="readonly_fields"></p>
<h4 id="&#x7AD9;&#x70B9;&#x4FDD;&#x5B58;&#x5BF9;&#x8C61;&#x6570;&#x636E;&#x65B9;&#x6CD5;&#x91CD;&#x5199;">&#x7AD9;&#x70B9;&#x4FDD;&#x5B58;&#x5BF9;&#x8C61;&#x6570;&#x636E;&#x65B9;&#x6CD5;&#x91CD;&#x5199;</h4>
<p>&#x5728;Django&#x7684;&#x539F;&#x751F;admin&#x7AD9;&#x70B9;&#x4E2D;&#xFF0C;&#x5982;&#x679C;&#x60F3;&#x8981;&#x5728;&#x7AD9;&#x70B9;&#x4FDD;&#x5B58;&#x6216;&#x5220;&#x9664;&#x6570;&#x636E;&#x65F6;&#xFF0C;&#x8865;&#x5145;&#x81EA;&#x5B9A;&#x4E49;&#x884C;&#x4E3A;&#xFF0C;&#x53EF;&#x4EE5;&#x91CD;&#x5199;&#x5982;&#x4E0B;&#x65B9;&#x6CD5;&#xFF1A;</p>
<ul>
<li><code>save_model(self, request, obj, form, change)</code></li>
<li><code>delete_model(self, request, obj)</code></li>
</ul>
<p>&#x800C;&#x5728;xadmin&#x4E2D;&#xFF0C;&#x9700;&#x8981;&#x91CD;&#x5199;&#x5982;&#x4E0B;&#x65B9;&#x6CD5;&#xFF1A;</p>
<ul>
<li><code>save_models(self)</code></li>
<li><code>delete_model(self)</code></li>
</ul>
<p>&#x5728;&#x65B9;&#x6CD5;&#x4E2D;&#xFF0C;&#x5982;&#x679C;&#x9700;&#x8981;&#x7528;&#x5230;&#x5F53;&#x524D;&#x5904;&#x7406;&#x7684;&#x6A21;&#x578B;&#x7C7B;&#x5BF9;&#x8C61;&#xFF0C;&#x9700;&#x8981;&#x901A;&#x8FC7;<code>self.obj</code>&#x6765;&#x83B7;&#x53D6;&#xFF0C;&#x5982;</p>
<pre><code class="lang-python"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">SKUSpecificationAdmin</span><span class="hljs-params">(object)</span>:</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">save_models</span><span class="hljs-params">(self)</span>:</span>
        <span class="hljs-comment"># &#x4FDD;&#x5B58;&#x6570;&#x636E;&#x5BF9;&#x8C61;</span>
        obj = self.new_obj
        obj.save()

        <span class="hljs-comment"># &#x8865;&#x5145;&#x81EA;&#x5B9A;&#x4E49;&#x884C;&#x4E3A;</span>
        <span class="hljs-keyword">from</span> celery_tasks.html.tasks <span class="hljs-keyword">import</span> generate_static_sku_detail_html
        generate_static_sku_detail_html.delay(obj.sku.id)

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">delete_model</span><span class="hljs-params">(self)</span>:</span>
        <span class="hljs-comment"># &#x5220;&#x9664;&#x6570;&#x636E;&#x5BF9;&#x8C61;</span>
        obj = self.obj
        sku_id = obj.sku.id
        obj.delete()

        <span class="hljs-comment"># &#x8865;&#x5145;&#x81EA;&#x5B9A;&#x4E49;&#x884C;&#x4E3A;</span>
        <span class="hljs-keyword">from</span> celery_tasks.html.tasks <span class="hljs-keyword">import</span> generate_static_sku_detail_html
        generate_static_sku_detail_html.delay(sku_id)
</code></pre>
<h4 id="&#x81EA;&#x5B9A;&#x4E49;&#x7528;&#x6237;&#x7BA1;&#x7406;">&#x81EA;&#x5B9A;&#x4E49;&#x7528;&#x6237;&#x7BA1;&#x7406;</h4>
<p>xadmin&#x4F1A;&#x81EA;&#x52A8;&#x4E3A;admin&#x7AD9;&#x70B9;&#x6DFB;&#x52A0;&#x7528;&#x6237;User&#x7684;&#x7BA1;&#x7406;&#x914D;&#x7F6E;</p>
<p>xadmin&#x4F7F;&#x7528;xadmin.plugins.auth.UserAdmin&#x6765;&#x914D;&#x7F6E;</p>
<p>&#x5982;&#x679C;&#x9700;&#x8981;&#x81EA;&#x5B9A;&#x4E49;User&#x914D;&#x7F6E;&#x7684;&#x8BDD;&#xFF0C;&#x9700;&#x8981;&#x5148;unregister(User)&#xFF0C;&#x5728;&#x6DFB;&#x52A0;&#x81EA;&#x5DF1;&#x7684;User&#x914D;&#x7F6E;&#x5E76;&#x6CE8;&#x518C;</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> xadmin
<span class="hljs-comment"># Register your models here.</span>

<span class="hljs-keyword">from</span> .models <span class="hljs-keyword">import</span> User
<span class="hljs-keyword">from</span> xadmin.plugins <span class="hljs-keyword">import</span> auth


<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">UserAdmin</span><span class="hljs-params">(auth.UserAdmin)</span>:</span>
    list_display = [<span class="hljs-string">&apos;id&apos;</span>, <span class="hljs-string">&apos;username&apos;</span>, <span class="hljs-string">&apos;mobile&apos;</span>, <span class="hljs-string">&apos;email&apos;</span>, <span class="hljs-string">&apos;date_joined&apos;</span>]
    readonly_fields = [<span class="hljs-string">&apos;last_login&apos;</span>, <span class="hljs-string">&apos;date_joined&apos;</span>]
    search_fields = (<span class="hljs-string">&apos;username&apos;</span>, <span class="hljs-string">&apos;first_name&apos;</span>, <span class="hljs-string">&apos;last_name&apos;</span>, <span class="hljs-string">&apos;email&apos;</span>, <span class="hljs-string">&apos;mobile&apos;</span>)
    style_fields = {<span class="hljs-string">&apos;user_permissions&apos;</span>: <span class="hljs-string">&apos;m2m_transfer&apos;</span>, <span class="hljs-string">&apos;groups&apos;</span>: <span class="hljs-string">&apos;m2m_transfer&apos;</span>}

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_model_form</span><span class="hljs-params">(self, **kwargs)</span>:</span>
        <span class="hljs-keyword">if</span> self.org_obj <span class="hljs-keyword">is</span> <span class="hljs-keyword">None</span>:
            self.fields = [<span class="hljs-string">&apos;username&apos;</span>, <span class="hljs-string">&apos;mobile&apos;</span>, <span class="hljs-string">&apos;is_staff&apos;</span>]

        <span class="hljs-keyword">return</span> super().get_model_form(**kwargs)


xadmin.site.unregister(User)
xadmin.site.register(User, UserAdmin)
</code></pre>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="./C06-Pay/PaymentResult.html" class="navigation navigation-prev " aria-label="Previous page: 保存支付结果"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="./C08-Permission.html" class="navigation navigation-next " aria-label="Next page: 用户权限控制"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="gitbook/app.js"></script>

    
    <script src="gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
